/*
 * @Description: 设备接口
 * @Author: lwx
 * @Date: 2022-06-24 14:41:37
 * @LastEditors: lwx
 * @LastEditTime: 2023-04-12 11:29:51
 */
import request from '@/utils/request'

/* 获取设备信息列表 */
export function DeviceList(page) {
    return request({
        url: '/facility',
        method: 'GET',
        params: page
    })
}
/* 添加设备 */
export function addDevice(data) {
    return request({
        url: '/facility',
        method: 'POST',
        data
    })
}
/* 修改设备信息 */
export function updateDeviceInfo(data) {
    return request({
        url: '/facility',
        method: 'PUT',
        data
    })
}
/* 删除设备 */
export function removeDevice(facility_id) {
    return request({
        url: '/facility',
        method: 'DELETE',
        data: {
            facility_id
        }
    })
}

/* 获取工位 */
export function getStationList(is_page) {
    return request({
        url: '/station',
        method: 'GET',
        params: {
            is_page
        }
    })
}

/* 获取设备参数信息 */
export function deviceData(facility_id, sep_number) {
    return request({
        url: '/machine/status',
        method: 'GET',
        params: {
            facility_id,
            sep_number
        }
    })
}